<?php 
include("sesiune.php");

$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$insertQuery = "insert into user (username, password, email, firstname, lastname) values ('".escInjection($username)."', '".escInjection($password)."','".escInjection($email)."', '".escInjection($firstname)."', '".escInjection($lastname)."' )";
$q = mysql_query($insertQuery,getConnection());
if (!$q){
	echo "Eroare".mysql_error();
}
else{
header('Location: login.php');
}
?>